<?php

namespace common\models\shop;

use Yii;

/**
 * This is the model class for table "shop_order_goods".
 *
 * @property string $id
 * @property string $weid
 * @property string $orderid
 * @property string $goodsid
 * @property string $price
 * @property string $total
 * @property integer $optionid
 * @property string $createtime
 * @property string $optionname
 */
class ShopOrderGoods extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'shop_order_goods';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['orderid', 'goodsid', 'createtime'], 'required'],
            [['orderid', 'goodsid', 'total', 'optionid', 'createtime'], 'integer'],
            [['price'], 'number'],
            [['optionname'], 'string'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'orderid' => '订单',
            'goodsid' => '商品',
            'price' => '价格',
            'total' => '数量',
            'optionid' => '规格',
            'createtime' => '创建时间',
            'optionname' => '规格名称',
        ];
    }




}
